<%inherit file="/base/index.html"/>
<%namespace file="fields.html" name="fields" import="*"/>
<%def name="script()">
<script type="text/javascript">
var dict_service_url = "${h.url_for(controller="service", action="dict", id=None, doc_id=None)}";
var transliterate_service_url = "${h.url_for(controller="service", action="transliterate", doc_id=None, id=None)}";
var translate_service_url = "${h.url_for(controller="service", action="translate", id=None, doc_id=None)}";
var tm_service_url = "${h.url_for(controller="doc", action="tm", id=request.urlvars['doc_id'], doc_id=None)}";
</script>
${h.javascript_link(h.url_for("/js/jquery.js"))}
${h.javascript_link(h.url_for("/js/jquery-fieldselection.js"))}
${h.javascript_link(h.url_for("/js/dict.js"))}
${h.javascript_link(h.url_for("/js/transliterate.js"))}
${h.javascript_link(h.url_for("/js/tm.js"))}
%if c.use_google:
	${h.javascript_link('http://www.google.com/jsapi')}
	<script type="text/javascript">
		google.load("language", "1");
	</script>
	${h.javascript_link(h.url_for("/js/google_translate.js"))}
%else:
	${h.javascript_link(h.url_for("/js/translate.js"))}
%endif

</%def>
<%def name="header()"><div id="header">${_(u"Create new translation")}</div></%def>
%if c.use_google:
<div id='branding'> </div>
%endif
<p>
<form method="post"
      action="${h.url_for(controller='trans', action='create', doc_id=request.urlvars['doc_id'])}">
	${h.hidden("doc_id", value = request.urlvars['doc_id'], id="doc_id")}
    ${fields.body()}
    ${h.link_to(_(u"Cancel"), h.url_for(controller='doc', action="view", id=request.urlvars['doc_id']))}
    ${h.submit(value=_(u"Save Changes"), name='submit')}
</form>
</p>
